package cn.rongdao.jrkabao.ui.financing.adapter;

import android.content.Context;
import android.view.ViewGroup;

import com.mifengkong.frtools.ui.adapter.recyclerview.FRBaseRecyclerAdapter;
import com.mifengkong.frtools.inputmethod.FRView;

import cn.rongdao.jrkabao.R;
import cn.rongdao.jrkabao.bean.cashadvance.CashAdvanceBean;

/**
 * Created by jack on 2017/9/8
 */

public class FinancingAdapter extends FRBaseRecyclerAdapter<CashAdvanceBean.FinancialListBean, FinancingViewHolder> {

    public FinancingAdapter(Context context, OnItemClickListener<FinancingViewHolder> listener) {
        super(context, listener);
    }

    @Override
    public FinancingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new FinancingViewHolder(FRView.inflateLayout(getContext(), R.layout.item_financing, parent, false));
    }

    public void setLastData() {
        getDataList().get(getDataList().size() - 1).setLast(true);
        notifyDataSetChanged();
    }
}